<!DOCTYPE html>
<html>
<head>
                <meta charset="utf-8">
                <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
                <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
                <link rel="stylesheet" type="text/css" href="../../css/aui.css">
                <link rel="stylesheet" type="text/css" href="../../css/aui-slide.css">
                <link rel="stylesheet" type="text/css" href="../../css/api.css">
                <link rel="stylesheet" href="../../css/common.css">
                <link rel="stylesheet" type="text/css" href="../../font-icon/demo.css">
                <link rel="stylesheet" type="text/css" href="../../font-icon/iconfont.css">
                <script type="text/javascript" src="../../script/api.js"></script>
                <script type="text/javascript" src="../../script/APICloud-rest.js"></script>
                <script type="text/javascript" src="../../script/APICloud-rest-SHA1.js"></script>
                <script type="text/javascript" src="../../script/SHA1.js"></script>
                <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
</head>

<title></title>
<style>
.this_dt{
        width: 100%;background-color: #fff;margin-top: 3rem;float: right;border-bottom: solid 0.7rem #eeeeee;position: relative;
}
.this_dt_1{
        display: flex;flex-direction: row;flex-wrap: nowrap;align-items:center;margin-left: 0.5rem;    margin-top: 0.5rem;
}
.this_dt_2{
        width: 94%;margin-left: 0.6rem;font-size: 0.8rem;display: flex;flex-direction: row;flex-wrap: wrap;justify-content: flex-start;
}
html { overflow-x: hidden; overflow-y: auto; }
.zhuanfa{
    display: flex;flex-direction: row;flex-wrap: nowrap;
   
}
.zhuanfa_share{
    width:32% ;
    height:3.4rem;
   position:absolute;
 z-index: 999;
    /* margin-left: ;
    margin-top: ; */
    border-radius: 0.3rem;
    background-image: url('../../image/share_bottom.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
   z-index: 999;
   bottom:2rem;
   display: none;
}
</style>
</head>
<body >
      
                <div id="youquan_tab" >
                                <header id="header" class="aui-bar aui-bar-nav" >
                                                <i class="aui-iconfont aui-icon-left"  style="float:left;margin: 0.5rem;" onclick="api.closeWin()"></i>
                                    <div class="aui-title">关注</div>
                                    
                                </header>
                             
                </div>
                            


                <div class="this_dt" id="one">
                      <div class="this_dt_1">
                                <div style="width: 3rem;height: 3rem;border-radius: 100%;background-color: red;float: left;"></div>
                                <div  style="width:7rem;height: 3rem;background-color: #fff;margin-left: 0.5rem;display: flex;flex-direction: column;">
                                        <span style="height:1.8rem;line-height: 2rem;font-size: 0.8rem;font-weight: bold; ">方法</span>
                                        <span style="height:1.7rem ;font-size: 0.8rem;">10:10</span>
                                </div>
                                <div style="display: flex;flex-direction: row;flex-wrap: nowrap;background-color: #fff;width: 43%;height: 2rem;align-items:flex-end;justify-content:flex-end;">
                                      <span class="aui-iconfont aui-icon-laud" style="font-size: 1rem;"></span><span style="font-size: 0.7rem;line-height:1.6rem;margin-right: 0.5rem">s</span>  
                                      <span class="aui-iconfont aui-icon-comment" style="font-size: 1rem;margin-right: 0.5rem"></span> 
                                      <span style="width:1.1rem;height:1.1rem;margin-top: -0.2rem;margin-right: 0.5rem"><img  style="margin-top: -0.3rem;" src="../../image/reward.png"/></span> 
                                </div>
                     </div> 
                     
                     <div class="this_dt_2">
                             sdfdsgsdgdsgsdgsd对方水电费阿达说的阿尔啊放入对方水电费等sssssssss
                     </div>
                     
                     <div id="is_zhuanfa">

                                <div style="display: flex;flex-direction: row;flex-wrap: wrap;margin-left: 0.8rem;">
                                       
                                        <div style="width: 5rem;height: 5rem;background-color: red;margin: 0.25rem;"><img></div>  
                                        <div style="width: 5rem;height: 5rem;background-color: red;margin: 0.25rem;"><img></div> 
                                        <div style="width: 5rem;height: 5rem;background-color: red;margin: 0.25rem;"><img></div> 
                                        <div style="width: 5rem;height: 5rem;background-color: red;margin: 0.25rem;"><img></div>  <div class="zhuanfa_share">sssssssssssssssss </div>
                                </div>  
                                <!-- <div style="background-color: #f5f5f5; margin: 0.5rem;border: solid #f5f5f5 0.1rem;">
                                     <div style=" width: 92%;margin-left: 0.6rem;font-size: 0.8rem;display: flex;flex-direction: row;flex-wrap: wrap;justify-content: flex-start;background-color: aqua;word-break:break-all;margin-top: 0.5rem;" >
                                        sssssssssssssssssssssssdddddddddddddddd十少时诵诗书所所所所多个发生的符合
                                    </div>  
                                    <div  style="display: flex;flex-direction: row;flex-wrap: wrap;justify-content: flex-start;margin-left: 2.3%;">
                                                <div style="width: 4.8rem;height: 4.8rem;background-color: red;margin: 0.25rem;"><img></div>  
                                                <div style="width: 4.8rem;height: 4.8rem;background-color: red;margin: 0.25rem;"><img></div>    
                                                <div style="width: 4.8rem;height: 4.8rem;background-color: red;margin: 0.25rem;"><img></div>
                                                <div style="width: 4.8rem;height: 4.8rem;background-color: red;margin: 0.25rem;"><img></div>       
                                    </div>  
                                </div> -->
                               
                     </div>
                    
                </div>
                
               
                <div style="font-size: 0.8rem;margin-left: 0.3rem;font-weight: bold;border-bottom: solid #e9e9e9 0.05rem;top:0rem;line-height: 1.8rem;" id="get_pinglun_num">暂无评论</div>


                <div style="width: 100%;background-color: #fff;display: flex;flex-direction: column;margin-bottom: 3rem;position: relative;" id="is_pinglun">
                        

                        <div style="display: flex;flex-direction: column;">
                                        <!-- <div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left: 0.5rem;" >
                                                        <div style="width: 2.5rem;height: 2.5rem;border-radius: 100%;background-color: red;"> </div>
                                                        <div style="display: flex;flex-direction: column;width: 6rem;height: 100%;width: 11rem;background-color: transparent;margin-left: 0.3rem">
                                                                <span style="height: 60%;font-size: 0.75rem;line-height: 1.5rem;color: #018aff;">s解决</span>
                                                                <span style="height: 40%;font-size: 0.7rem">s上述</span>
                                                        </div>
                                                        <div style="height: 100%;line-height: 1.8rem;">
                                                                        <span class="aui-iconfont aui-icon-laud" style="height: 60%;font-size: 0.9rem;line-height: 1.5rem;">xx</span>
                                                               
                                                        </div>
                                        </div>
                                        <div  style="display: flex;flex-direction: row;margin-left: 0.5rem;align-items: flex-end;">
                                                <div style="background-color: transparent;width: 61%;color: #999999;background-color: red;margin-left: 2.8rem;display: flex;flex-direction: row;flex-wrap: wrap;font-size: 0.8rem; word-break:break-all; ">
                                                        sssssssssssssssssssssssssssssssssssssssssssssss
                                                </div>
                                                <div style="text-align: right;width: 3.2rem;background-color: transparent;">
                                                        回复
                                                </div>

                                        </div> -->
                                       
                                        <div style="width: 78%;height: 0.1rem;;margin-left: 18%;"> </div>
                        </div>


                      
                       
                        
                       
                </div>

                <div style="width: 100%;height: 3rem;background-color: #fff;position: fixed;bottom: 0rem;display: flex;flex-direction: row;flex-wrap: nowrap;">
                        <input style="width: 76% ;height: 2rem;border: solid 0.08rem #e9e9e9;border-radius: 0.5rem;margin-left: 1rem;margin-top: 0.5rem;" class="ppplll" />
                        <div style="font-size: 0.9rem;line-height: 3rem;margin-left: 0.5rem;width: 2rem;height: 2.5rem;" onclick="huifu_value()">评论</div>
                </div>
                            
             

        

</body>
<script  type="text/javascript">
 apiready = function() {




                        var id_dongtai_xq_zh = $api.getStorage('id_dongtai_xq_zh');
                        // var id_dongtai_xq_zh = $api.getStorage('id_dongtai_xq_zh');
                         
                        var token = $api.getStorage('token');
                        
                        var token = {
                                token: token,
                                categry:'get_dt',
                                dtid:id_dongtai_xq_zh
                                
                        
                        };
                        api.ajax({
                        url: 'http://www.mk517.com/webApi/youquans.php',
                        method: 'post',
                        "headers": {
                                "Content-Type": "application/json"
                        },
                        dataType: "json",
                        data: {
                                body: token
                        }
                        }, function(ret, err) {
                        // alert(JSON.stringify(ret));

                        if (ret) {              
                                                var guanzhu='';
                                                if(ret['isfollow']==1){
                                                        guanzhu = '已关注';
                                                } else if(ret['isfollow']==0){
                                                          guanzhu = '+关注'; 
                                                }
                                               var str_dt1=      '<div class="this_dt_1">'+
                                                                                '<div style="width: 3rem;height: 3rem;border-radius: 100%;background-color: red;float: left;"><img style="width:100%;height:100%" src="'+ret['head_img']+'"></div>'+
                                                                                '<div  style="width:7rem;height: 3rem;background-color: #fff;margin-left: 0.5rem;display: flex;flex-direction: column;">'+
                                                                                       ' <span style="height:1.7rem;line-height: 2rem;font-size: 0.8rem;font-weight: bold; ">'+ret['name']+'</span>'+
                                                                                       ' <span style="height:1.8rem ;font-size: 0.8rem;">'+ret['time']+'</span>'+
                                                                              '  </div>'+
                                                                               ' <div style="display: flex;flex-direction: row;flex-wrap: nowrap;background-color: #fff;width: 43%;height: 2rem;align-items:flex-end;justify-content:flex-end;">'+
                                                                                        '  <div class="aui-btn aui-btn-warning guanzhu_1 " >'+guanzhu+'</div><input value="'+ret['uid']+'" type="hidden">'+
                                                                                '</div>'+
                                                               ' </div>' +
                                                               ' <div class="this_dt_2">'+
                                                                      ret['content']+
                                                               ' </div>'+
                                                              
                                                               ' <div id="is_zhuanfa"">'+
                                                                                '<div style="display: flex;flex-direction: row;flex-wrap: wrap;margin-left:0.45rem; style="background-color:red;" id="imgs">';
                                                                                     
                                               var str_dt2=   ' </div>  ';
                                               var str_dt2_1=      ' <div class="aui-card-list-footer aui-border-t" style="margin-top:0.2rem;">'+
                                                                                                        '<div id="post_star_count">'+
                                                                                                ' <li class="zhuanfa" >'+
                                                                                                ' <img src="../../image/zf.png" style="width:0.8rem;height: 0.8rem;" onclick="sharePost(0);">'+
                                                                                                        ret['forward_count']+
                                                                                                        '</li> '+
                                                                                                        '</div>'+
                                                                                                        '<div id="post_laud_count"> '+ 
                                                                                                        '<li id="laud0" class="post_zan"><span class="aui-iconfont aui-icon-laud "></span>'+ret['zan']+'</li></div>'+
                                                                                                        '<div id="post_note_count"><li class="aui-iconfont aui-icon-comment" id="note" onclick="postComment(1,2)">'+
                                                                                                          ret['comment']+
                                                                                                        '</li>'+
                                                                                                        '</div>'+
                                                                                                        '<div id="post_star_count">'+
                                                                                                                '<li style="display: flex;flex-direction: row;flex-wrap: nowrap">'+
                                                                                                        ' <img style="width:1rem;height: 1rem;" src="../../image/reward.png" onclick="postMon(2,1)">'+
                                                                                                        ret['reward']+
                                                                                                        '  </li>'+
                                                                                                ' </div> '+
                                                                                                        
                                                                                        ' </div>'+
                                                                                         ' </div>';
                                                var str_imgs = '';

                                                var  zhuanfa_share =  
                                                                        '<div class="zhuanfa_share" id="sss">'+
                                                                        '<li style="height:43%;line-height:250%;">'+
                                                                        '<span  class="aui-iconfont aui-icon-share" style="margin-left:10%;color:#999999;font-weight: bold;"></span>'+
                                                                        '<span style="font-size:0.7rem;margin-left:1rem;">分享</span></li >'+
                                                                        '<li style="margin-left:5%; width:90%;height:0.05rem;background-color:#d2d2d2;"></li>'+
                                                                        '<li onclick="open_zhuanfa()" ><img class="li_img" src="../../image/zf.png" style="margin-left:10%;margin-top:3%;height:0.9rem;width:0.9rem;"><span style="float:left;font-size:0.7rem;margin-left:2.4rem;margin-top:-13%;">转发</span>'+
                                                                        '</li></div>'+
                                                                        '<input value="'+ret['id']+'" type="hidden">';
                                                               for(var i=0;i<ret['img'].length;i++){
                                                                       str_imgs +=' <div style="width: 5.2rem;height: 5.2rem;background-color: red;margin: 0.25rem;"><img style="width:100%;height:100%;"src="'+ret['img'][i]+'"></div>';
                                                               }
                              
                                $api.byId('one').innerHTML=  str_dt1 +str_imgs+str_dt2+zhuanfa_share+str_dt2_1  ;     
                                            
                        }else {
                                alert(JSON.stringify(err));
                        }
                        });


                     



//评论                  

                        var id_dongtai_xq = $api.getStorage('id_dongtai_xq_zh');
                        // var id_dongtai_xq_zh = $api.getStorage('id_dongtai_xq_zh');
                         
                        var token = $api.getStorage('token');
                        
                        var token = {
                                token: token,
                                categry:'comment',
                                dtid:id_dongtai_xq_zh
                                
                        
                        };
                      
                        api.ajax({
                        url: 'http://www.mk517.com/webApi/youquans.php',
                        method: 'post',
                        "headers": {
                                "Content-Type": "application/json"
                        },
                        dataType: "json",
                        data: {
                                body: token
                        }
                        }, function(ret, err) {
                        // alert(JSON.stringify(ret));
                        if (ret) {
                        
                              

                               if(ret.sta!==undefined||ret.sta==0){//无评论

                                $api.byId('get_pinglun_num').innerHTML='暂无评论';
                               }else{//有
                                $api.byId('get_pinglun_num').innerHTML='评论'+ret.length;
                                var str1='';
                                var str2='';
                                var  str1_end='';
                                // alert(ret[i]['id']==id{});
                                for(var i=0;i<ret.length;i++){
                                                        str1+=        '<div style="display: flex;flex-direction: column;margin-top:0.5rem;">'+
                                                                                '<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left: 0.5rem;" >'+
                                                                                                '<div style="width: 2.5rem;height: 2.5rem;border-radius: 100%;background-color: red;"> <img src="'+ret[i]['head_img']+'"></div>'+
                                                                                               ' <div style="display: flex;flex-direction: column;width: 6rem;height: 100%;width:8rem;background-color: transparent;margin-left: 0.3rem">'+
                                                                                                        '<span style="height: 30%;font-size: 0.75rem;line-height: 1.3rem;color:#018aff ;">'+ret[i]['name']+'</span>'+
                                                                                                       ' <span style="height: 30%;font-size: 0.7rem">'+ret[i]['time']+'</span>'+
                                                                                               ' </div>'+
                                                                                               ' <div style="height: 1rem;line-height: 1.8rem;display:flex;flex-direction: row;flex-wrap: nowrap;justify-content: center;width:7rem;">'+
                                                                                                                '<div style="width:2rem;height: 60%;"><span class="aui-iconfont aui-icon-laud" style="font-size: 0.9rem;line-height: 1.5rem;">'+ret[i]['zan']+'</span></div>'+
                                                                                                                '<div style="width:2rem;height: 60%;"><span class="aui-iconfont aui-icon-comment" style="font-size: 0.9rem;line-height: 1.5rem;">'+
                                                                                                                                ret[i]['reply_count']+'</span></div>'+
                                                                                                                
                                                                                                '</div>'+
                                                                                '</div>'+
                                                                                '<div  style="display: flex;flex-direction: row;margin-left: 0.5rem;align-items: flex-end;">'+
                                                                                       ' <div style="background-color: transparent;width: 61%;color: #999999;margin-left: 2.8rem;display: flex;flex-direction: row;flex-wrap: wrap;font-size: 0.8rem; word-break:break-all; ">'+
                                                                                                ret[i]['content']+
                                                                                        '</div>'+
                                                                                        '<div style="text-align: right;width: 3.2rem;background-color: transparent;color:#018aff"  class="hhhfff_opan">'+
                                                                                                '回复'+
                                                                                                '<input type="hidden" value="'+ret[i]['id']+'">'+
                                                                                        '</div>'+
                                                                                '</div>';
                                             if(ret[i]['reply']){
                                                   
                                                     for(var j=0;j <  ret[i]['reply'].length;j++){
                                                        str2+=                   ' <div style="display: flex;flex-direction: column;justify-content: flex-start;font-size: 0.65rem;" >'+
                                                                                                ' <span style="color:#018aff;font-size: 0.7rem;height:1rem;">'+ret[i]['reply'][j]['name']+'<span style="color:#999999;"> 回复</span>'+ret[i]['reply'][j]['toname']+'</span>'+
                                                                                                '<span>'+ret[i]['reply'][j]['content']+'</span>'+
                                                                                '</div>';
                                                       
                                                     }
                                               

                                             }                    
                                                               
                                                         str1_end +=             
                                                                                '<div style="width: 78%;height: 0.1rem;background-color: #e9e9e9;;margin-left: 18%;"> </div>'+
                                                                        '</div>'; 
                                }
                                $api.byId('is_pinglun').innerHTML=str1+'<div  style="width:77%;background-color: #f2f2f2;margin-left: 18%;margin-top:0.5rem;" >'+str2+'</div>'+str1_end;


                               }




                                
                        }else {
                                alert(JSON.stringify(err));
                        }
                        });

//去评论


                        // //z转发才
                        // if($api.getStorage('id_dongtai_xq_zh')!='' ){

                        //         var token = $api.getStorage('token');
                        //  var id_dongtai_xq_zh = $api.getStorage('id_dongtai_xq_zh');
                        // var token = {
                        //         token: token,
                        //         categry:'get_dt',
                        //         dtid:id_dongtai_xq_zh
                                
                        
                        // };
                        // api.ajax({
                        // url: 'http://www.mk517.com/webApi/youquans.php',
                        // method: 'post',
                        // "headers": {
                        //         "Content-Type": "application/json"
                        // },
                        // dataType: "json",
                        // data: {
                        //         body: token
                        // }
                        // }, function(ret, err) {
                        // // alert(JSON.stringify(ret));
                        // if (ret) {
                                
                               
                        //         $api.byId('is_zhuanfa').innerHTML= ' <div style="background-color: #f5f5f5; margin: 0.5rem;border: solid #f5f5f5 0.1rem;">'+
                        //                 '<div style="font:size;0.8rem;height:1rem;line-height:1.6rem;color:#2a5683;margin-left:0.2rem;">'+ret['name']+':</div>'+
                        //              '<div style=" width: 92%;margin-left: 0.6rem;font-size: 0.7rem;display: flex;flex-direction: row;flex-wrap: wrap;justify-content: flex-start;word-break:break-all;margin-top: 0.5rem;" >'+
                        //                ret['content']+
                        //             '</div> '+ 
                        //           '  <div  style="display: flex;flex-direction: row;flex-wrap: wrap;justify-content: flex-start;margin-left: 2.3%;">'+
                        //                        ' <div style="width: 4.8rem;height: 4.8rem;background-color: red;margin: 0.25rem;"><img></div>  '+
                        //                         '<div style="width: 4.8rem;height: 4.8rem;background-color: red;margin: 0.25rem;"><img></div>   '+ 
                        //                         '<div style="width: 4.8rem;height: 4.8rem;background-color: red;margin: 0.25rem;"><img></div>'+
                        //                         '<div style="width: 4.8rem;height: 4.8rem;background-color: red;margin: 0.25rem;"><img></div> '+      
                        //            ' </div>  '+
                        //         '</div>' ;
                      
                        // // $api.setStorage('id_dongtai_xq_zh',''); 
                        // }else {
                        //         alert(JSON.stringify(err));
                        // $api.setStorage('id_dongtai_xq_zh','');
                        // }
                        // });

                        // }
                       
//zhuanfa
                                window.open_zhuanfa = function (){

                                api.openWin({
                                name: 'answer',
                                url: 'zhuanfa.html',
                                rect: {
                                x: 0,
                                y: 0,
                                w: 'auto',
                                h: 'auto'
                                },
                                pageParam: {
                                token: $api.getStorage('token')
                                },
                                allowEdit: true
                                });



                                }


//回复
                                window.huifu_value = function () {
                                       
                                        var con_pl=$('.ppplll').val();
                                      if( con_pl=='' ){
                                        alert('请输入内容再评论!');
                                      }else{
                                        var token = $api.getStorage('token');
                                var cc=$('.zhuanfa_share').next('input').val();


                                        var token = {
                                                token: token,
                                                to:cc,
                                                do:'comment' ,
                                                content: con_pl,
                                                reply:''
                                        };
                                        api.ajax({
                                        url: 'http://www.mk517.com/webApi/youquan_do.php',
                                        method: 'post',
                                        "headers": {
                                                "Content-Type": "application/json"
                                        },
                                        dataType: "json",
                                        data: {
                                                body: token
                                        }
                                        }, function(ret, err) {
                                        // alert(JSON.stringify(ret));
                                        if (ret) {
                                                if(ret.sta==1){
                                                        alert('发表成功!');
                                                        window.location.reload();
                                                }else if(ret.sta==0){
                                                        alert('发表失败!')
                                                }
                                                
                                        }else {
                                                alert(JSON.stringify(err));
                                        }
                                        });
                                      }
                                        
                                }
   //二级回复
                                $('body').on('click','.hhhfff_opan',function(){
                                        var new_id=$(this).children('input').val();
                                        $api.setStorage('new_id',new_id);
                                       
                                        api.openWin({
                                        name: 'coment',
                                        url: 'coment.html',
                                        rect: {
                                                x: 0,
                                                y: 0,
                                                w: 'auto',
                                                h: 'auto'
                                        },
                                        pageParam: {
                                                token: $api.getStorage('token')
                                        },
                                        allowEdit: true
                                        });

                                                                });

                                        



 }

 
 //加关注
 $('body').on('click','.guanzhu_1',function(){
                      
                                var guanzhu_id =  $(this).next('input').val();
                                var stm_guanzhu= $(this).text();
                                var this_guanzhu = $(this);
                                if(stm_guanzhu=='+关注'){
                                do_guanzhu='follow_to';
                                $(this).html("已关注");
                                // this_guanzhu.innerHTML='';
                                }else if(stm_guanzhu=='已关注'){
                                do_guanzhu='follow_del';
                                // this_guanzhu.innerHTML='';
                                $(this).html("+关注");
                                }
                                var token = $api.getStorage('token');
                                var token = {
                                                token: token,
                                                do:do_guanzhu,
                                                to:guanzhu_id
                                        };
                                        api.ajax({
                                        url: 'http://www.mk517.com/webApi/youquan_do.php',
                                        method: 'post',
                                        "headers": {
                                                "Content-Type": "application/json"
                                        },
                                        dataType: "json",
                                        data: {
                                                body: token
                                        }
                                        }, function(ret, err) {
                                        // alert(JSON.stringify(ret));
                                        if (ret) {
                                                if(ret.sta==1){
                                                alert('操作成功!');
                                                }else{
                                                alert('失败!');
                                                }
                                        }else {
                                                alert(JSON.stringify(err));
                                        }
                                        });
                                });         


                                $('body').on('click','.zhuanfa',function(){
                    $('.zhuanfa_share').toggle();
                    var cc=$('.zhuanfa_share').next('input').val();
                    
                    $api.setStorage('zhuanfa_id',cc);
                });



</script>
</html>